﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ShivamEMR.Model.Domain.PersonDomain;
using System.ComponentModel.DataAnnotations;
using ShivamEMR.Model.Domain.UIDomain; 

namespace ShivamEMR.Model.Domain.UserDomain
{
  public  class User  
    {
      public User()
      {
          ID = Guid.NewGuid();
      }

        #region Properties
        public Guid ID { get; set; }
        public string UserCode { get; set; }
        public string Name { get; set; }
        public string Password { get; set; }
        public bool HasCustomRights { get; set; }
        public string Notes { get; set; }
        #endregion

        #region ForeignKeyProperties      
        public Guid PersonID { get; set; }
        public int RoleID { get; set; }      
        #endregion

        #region NavigationalProperties
       [ForeignKey("PersonID")]
        public virtual Person Person { get; set; }
        [ForeignKey("RoleID")]     
        public virtual UserRole Role { get; set; }          
        public virtual ICollection<UserRight> Rights { get; set; } 
        public virtual ICollection<UserLog> Log { get; set; }
        public virtual ICollection<CRMDomain.Message> Messages { get; set; }
        //public virtual ICollection<UIDomain.Menu> DashboardMenus { get; set; }        
        #endregion
    }
}
